package com.woniu.rear.maintenance.business.web.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.rear.business.model.domain.RepairInfo;
import com.woniu.rear.maintenance.business.facade.client.HousingMaterialFacade;
import com.woniu.rear.maintenance.business.facade.param.SaveHousingMaterialParam;
import com.woniu.rear.maintenance.business.web.mapper.RepairInfoMapper;
import com.woniu.rear.maintenance.business.web.service.RepairInfoService;

import io.seata.spring.annotation.GlobalTransactional;
import lombok.extern.slf4j.Slf4j;

@Service
@Slf4j
public class RepairInfoServiceImpl extends ServiceImpl<RepairInfoMapper, RepairInfo> implements RepairInfoService{

	@Autowired
	private HousingMaterialFacade hmf;
	
	@GlobalTransactional(rollbackFor = Exception.class)
	@Override
	public void seataService(Integer cont) {
		SaveHousingMaterialParam shmp = new SaveHousingMaterialParam();
		shmp.setDictAllName("allName");
		hmf.save(shmp);
		log.debug("测试数据: {}",10/cont);
		RepairInfo ri = new RepairInfo();
		ri.setRepairNum("1122");
		save(ri);
	}

}
